/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ru.jSkyRoom.factory;

import ru.jSkyRoom.generator.command.EdidGenerationByBaseStrategy;
import ru.jSkyRoom.interfaces.major.Enchantment;
import ru.jSkyRoom.interfaces.major.Major;

/**
 *
 * @author Rakev
 */
public class EdidGenerationStrategyFactory {

    private static EdidGenerationStrategyFactory instance = new EdidGenerationStrategyFactory();

    public static EdidGenerationStrategyFactory create() {
        return instance;
    }

    protected EdidGenerationStrategyFactory() {
    }

    public <T extends Major> EdidGenerationByBaseStrategy<T> create(final Enchantment enchantment) {
        return new EdidGenerationByBaseStrategy<T>() {
            @Override
            public String generate(T baseItem) {
                return baseItem.getEDID() + "_" + enchantment.getEDID();
            }
        };
    }
}
